package com.neusoft.work.util;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MCPConfig {
    @Autowired
    private ToolCallbackProvider toolCallbackProvider;

    @Bean
    ChatClient create(ChatClient.Builder builder) {
        System.out.println("tt:"+toolCallbackProvider);
        return builder.defaultTools(toolCallbackProvider).build();
    }
}
